home *** CD-ROM | disk | FTP | other *** search
- (Defun C:Ltc ()
- (Setvar "Cmdecho" 0)
- (Setq BLIP (Getvar "Blipmode"))
- (Setvar "Blipmode" 0)
- (Setq C1 (Osnap (Setq E1 (Osnap (Getpoint
- "\nFirst circle: ")"Nea"))"Cen"))
- (Setq C2 (Osnap (Setq E2 (Osnap (Getpoint
- "\nSecond circle: ")"Nea"))"Cen"))
- (If (> (Distance C1 E1) (Distance C2 E2))
- (Setq A (List C2 C1)) (Setq A (List C1 C2))
- )
- (If (> (Distance C1 E1) (Distance C2 E2))
- (Setq B (List E2 E1)) (Setq B (List E1 E2))
- )
- (Setq Q (Getstring "\n(E)xternal or (I)nternal <E>: "))
- (If (= Q "e")
- (Setq Q "E")
- (If (= Q "i") (Setq Q "I")
- )
- )
- (Setq R1 (Distance (Car B) (Car A)))
- (Setq R2 (Distance (Cadr B) (Cadr A)))
- (If (= Q "I")
- (Setq R3 (+ R2 R1)) (Setq R3 (- R2 R1))
- )
- (Command "Circle" (Cadr A) R3)
- (Setq E3 (Polar (Cadr A) (Angle (Cadr A) (Cadr B)) R3))
- (Command "Line" (Car A) (Osnap E3 "Tan")
- (Osnap (Cadr B) "Per") "")
- (Setq Tan1 (Getvar "Lastpoint"))
- (Repeat 3
- (Command "Erase" "L" "")
- )
- (Command "Line" Tan1 (Osnap (Car B) "Tan") "")
- (Setvar "Blipmode" BLIP)
- )